﻿using System;
using System.Data;
using Model;
using DBUtility;

namespace DAL
{
     /// <summary>
     /// 数据访问层RESULT_SUSPENSION_DAL
     /// </summary>
     public class RESULT_SUSPENSION_DAL
     {
         public RESULT_SUSPENSION_DAL()
         {
         }


         /// <summary>
         /// 得到最大JCLSH
         /// </summary>
         public string GetMax_JCLSH(string p_strWhere)
         {
             string strResult = "0";
             string strSql = "select max(JCLSH) as m from RESULT_SUSPENSION";

             if(p_strWhere.Trim().Length > 0)
             {
                 strSql += " where " + p_strWhere;
             }

             DataTable dtTemp = new DataTable();
             DbHelper.GetTable(strSql, ref dtTemp);

             if(dtTemp.Rows.Count>0)
             {
                 if(dtTemp.Rows[0]["m"].ToString().Length>0)
                 {
                     strResult = dtTemp.Rows[0]["m"] == DBNull.Value ? "" : dtTemp.Rows[0]["m"].ToString();
                 }
             }

             dtTemp.Dispose();

             return string.Format("{0:D50}", Convert.ToInt32(strResult) + 1);

          }

          /// <summary>
          /// 得到最大JCLSH
          /// </summary>
          public string GetMax_JCLSH()
          {
              return GetMax_JCLSH("");
          }


          /// <summary>
          /// 判断数据是否存在
          /// </summary>
          public bool Exists(string strJCLSH)
          {
               bool bolResult = false;

               if (strJCLSH == null)
               {
                   return false;
               }

               if (strJCLSH.Length == 0)
               {
                   return false;
               }

               string strSql = "";
               strSql += "select count(1) as c from RESULT_SUSPENSION";
               strSql += " where ";
               strSql += " JCLSH='"+ strJCLSH +"'";

               DataTable dtTemp = new DataTable();
               DbHelper.GetTable(strSql, ref dtTemp);

               if (dtTemp.Rows.Count > 0)
               {
                   bolResult = Convert.ToInt32(dtTemp.Rows[0]["c"]) > 0;
               }

               dtTemp.Dispose();

               return bolResult;

          }

          /// <summary>
          /// 获取数据总记录数
          /// </summary>
          public int GetRecordCount(string p_strWhere)
          {
              int intResult=0;

              string strSql = "";
              strSql += "select count(1) as c from RESULT_SUSPENSION";
              if(p_strWhere.Trim().Length > 0)
              {
                 strSql += " where " + p_strWhere;
              }

              DataTable dtTemp = new DataTable();
              DbHelper.GetTable(strSql, ref dtTemp);

              if(dtTemp.Rows.Count>0)
              {
                  intResult=Convert.ToInt32(dtTemp.Rows[0]["c"]);
              }

              dtTemp.Dispose();

              return intResult;
          }

          /// <summary>
          /// 获取数据总记录数
          /// </summary>
          public int GetRecordCount()
          {
              return GetRecordCount("");
          }

          /// <summary>
          /// 获取数据分页总数
           /// </summary>
          public int GetPageCount(string p_strWhere, int p_intPageSize)
          {
              int intResult=0;

              if(p_intPageSize > 0)
              {
                  int intRecordCount = GetRecordCount(p_strWhere);
                  intResult = Convert.ToInt32(Math.Truncate(Convert.ToDecimal(intRecordCount) / Convert.ToDecimal(p_intPageSize)));
                  if (intRecordCount > (intResult * p_intPageSize))
                  {
                       intResult++;
                  }
              }

              if(intResult == 0)
              {
                   intResult++;
              }
              return intResult;
           }

          /// <summary>
          /// 获取数据分页总数
          /// </summary>
          public int GetPageCount(int p_intPageSize)
          {
              return GetPageCount("", p_intPageSize);
          }

          /// <summary>
          /// 添加一条数据 SQL
          /// </summary>
          public string InsertSQL(RESULT_SUSPENSION model)
          {
              string strFieldSQL = "";
              string strValueSQL = "";

              if(model.Changed("ID") == true)
              {
                   strFieldSQL += ",ID";
                   strValueSQL += "," + model.ID + "";
              }

              if(model.Changed("XJJCCS") == true)
              {
                   strFieldSQL += ",XJJCCS";
                   strValueSQL += ",'" + model.XJJCCS.Replace("'","''") + "'";
              }

              if(model.Changed("JCLSH") == true)
              {
                   strFieldSQL += ",JCLSH";
                   strValueSQL += ",'" + model.JCLSH.Replace("'","''") + "'";
              }

              if(model.Changed("QZZLJTJDL") == true)
              {
                   strFieldSQL += ",QZZLJTJDL";
                   strValueSQL += ",'" + model.QZZLJTJDL.Replace("'","''") + "'";
              }

              if(model.Changed("QZZLDTJDL") == true)
              {
                   strFieldSQL += ",QZZLDTJDL";
                   strValueSQL += ",'" + model.QZZLDTJDL.Replace("'","''") + "'";
              }

              if(model.Changed("QZZLXSLV") == true)
              {
                   strFieldSQL += ",QZZLXSLV";
                   strValueSQL += ",'" + model.QZZLXSLV.Replace("'","''") + "'";
              }

              if(model.Changed("QZZLXSLV_PD") == true)
              {
                   strFieldSQL += ",QZZLXSLV_PD";
                   strValueSQL += ",'" + model.QZZLXSLV_PD.Replace("'","''") + "'";
              }

              if(model.Changed("QZYLJTJDL") == true)
              {
                   strFieldSQL += ",QZYLJTJDL";
                   strValueSQL += ",'" + model.QZYLJTJDL.Replace("'","''") + "'";
              }

              if(model.Changed("QZYLDTJDL") == true)
              {
                   strFieldSQL += ",QZYLDTJDL";
                   strValueSQL += ",'" + model.QZYLDTJDL.Replace("'","''") + "'";
              }

              if(model.Changed("QZYLXSLV") == true)
              {
                   strFieldSQL += ",QZYLXSLV";
                   strValueSQL += ",'" + model.QZYLXSLV.Replace("'","''") + "'";
              }

              if(model.Changed("QZYLXSLV_PD") == true)
              {
                   strFieldSQL += ",QZYLXSLV_PD";
                   strValueSQL += ",'" + model.QZYLXSLV_PD.Replace("'","''") + "'";
              }

              if(model.Changed("QZXSLVC") == true)
              {
                   strFieldSQL += ",QZXSLVC";
                   strValueSQL += ",'" + model.QZXSLVC.Replace("'","''") + "'";
              }

              if(model.Changed("QZXSLVC_PD") == true)
              {
                   strFieldSQL += ",QZXSLVC_PD";
                   strValueSQL += ",'" + model.QZXSLVC_PD.Replace("'","''") + "'";
              }

              if(model.Changed("HZZLJTJDL") == true)
              {
                   strFieldSQL += ",HZZLJTJDL";
                   strValueSQL += ",'" + model.HZZLJTJDL.Replace("'","''") + "'";
              }

              if(model.Changed("HZZLDTJDL") == true)
              {
                   strFieldSQL += ",HZZLDTJDL";
                   strValueSQL += ",'" + model.HZZLDTJDL.Replace("'","''") + "'";
              }

              if(model.Changed("HZZLXSLV") == true)
              {
                   strFieldSQL += ",HZZLXSLV";
                   strValueSQL += ",'" + model.HZZLXSLV.Replace("'","''") + "'";
              }

              if(model.Changed("HZZLXSLV_PD") == true)
              {
                   strFieldSQL += ",HZZLXSLV_PD";
                   strValueSQL += ",'" + model.HZZLXSLV_PD.Replace("'","''") + "'";
              }

              if(model.Changed("HZYLJTJDL") == true)
              {
                   strFieldSQL += ",HZYLJTJDL";
                   strValueSQL += ",'" + model.HZYLJTJDL.Replace("'","''") + "'";
              }

              if(model.Changed("HZYLDTJDL") == true)
              {
                   strFieldSQL += ",HZYLDTJDL";
                   strValueSQL += ",'" + model.HZYLDTJDL.Replace("'","''") + "'";
              }

              if(model.Changed("HZYLXSLV") == true)
              {
                   strFieldSQL += ",HZYLXSLV";
                   strValueSQL += ",'" + model.HZYLXSLV.Replace("'","''") + "'";
              }

              if(model.Changed("HZYLXSLV_PD") == true)
              {
                   strFieldSQL += ",HZYLXSLV_PD";
                   strValueSQL += ",'" + model.HZYLXSLV_PD.Replace("'","''") + "'";
              }

              if(model.Changed("HZXSLVC") == true)
              {
                   strFieldSQL += ",HZXSLVC";
                   strValueSQL += ",'" + model.HZXSLVC.Replace("'","''") + "'";
              }

              if(model.Changed("HZXSLVC_PD") == true)
              {
                   strFieldSQL += ",HZXSLVC_PD";
                   strValueSQL += ",'" + model.HZXSLVC_PD.Replace("'","''") + "'";
              }

              if(model.Changed("QZ_PD") == true)
              {
                   strFieldSQL += ",QZ_PD";
                   strValueSQL += ",'" + model.QZ_PD.Replace("'","''") + "'";
              }

              if(model.Changed("HZ_PD") == true)
              {
                   strFieldSQL += ",HZ_PD";
                   strValueSQL += ",'" + model.HZ_PD.Replace("'","''") + "'";
              }

              if(model.Changed("XJ_PD") == true)
              {
                   strFieldSQL += ",XJ_PD";
                   strValueSQL += ",'" + model.XJ_PD.Replace("'","''") + "'";
              }

              if(model.Changed("QZXSLVXZXX") == true)
              {
                   strFieldSQL += ",QZXSLVXZXX";
                   strValueSQL += ",'" + model.QZXSLVXZXX.Replace("'","''") + "'";
              }

              if(model.Changed("QZXSLVXZSX") == true)
              {
                   strFieldSQL += ",QZXSLVXZSX";
                   strValueSQL += ",'" + model.QZXSLVXZSX.Replace("'","''") + "'";
              }

              if(model.Changed("QZXSLVCXZXX") == true)
              {
                   strFieldSQL += ",QZXSLVCXZXX";
                   strValueSQL += ",'" + model.QZXSLVCXZXX.Replace("'","''") + "'";
              }

              if(model.Changed("QZXSLVCXZSX") == true)
              {
                   strFieldSQL += ",QZXSLVCXZSX";
                   strValueSQL += ",'" + model.QZXSLVCXZSX.Replace("'","''") + "'";
              }

              if(model.Changed("HZXSLVXZXX") == true)
              {
                   strFieldSQL += ",HZXSLVXZXX";
                   strValueSQL += ",'" + model.HZXSLVXZXX.Replace("'","''") + "'";
              }

              if(model.Changed("HZXSLVXZSX") == true)
              {
                   strFieldSQL += ",HZXSLVXZSX";
                   strValueSQL += ",'" + model.HZXSLVXZSX.Replace("'","''") + "'";
              }

              if(model.Changed("HZXSLVCXZXX") == true)
              {
                   strFieldSQL += ",HZXSLVCXZXX";
                   strValueSQL += ",'" + model.HZXSLVCXZXX.Replace("'","''") + "'";
              }

              if(model.Changed("HZXSLVCXZSX") == true)
              {
                   strFieldSQL += ",HZXSLVCXZSX";
                   strValueSQL += ",'" + model.HZXSLVCXZSX.Replace("'","''") + "'";
              }

              if(model.Changed("SZZLJTJDL") == true)
              {
                   strFieldSQL += ",SZZLJTJDL";
                   strValueSQL += ",'" + model.SZZLJTJDL.Replace("'","''") + "'";
              }

              if(model.Changed("SZYLJTJDL") == true)
              {
                   strFieldSQL += ",SZYLJTJDL";
                   strValueSQL += ",'" + model.SZYLJTJDL.Replace("'","''") + "'";
              }

              if(model.Changed("SZZLDTJDL") == true)
              {
                   strFieldSQL += ",SZZLDTJDL";
                   strValueSQL += ",'" + model.SZZLDTJDL.Replace("'","''") + "'";
              }

              if(model.Changed("SZYLDTJDL") == true)
              {
                   strFieldSQL += ",SZYLDTJDL";
                   strValueSQL += ",'" + model.SZYLDTJDL.Replace("'","''") + "'";
              }

              if(model.Changed("SZZLXSLV") == true)
              {
                   strFieldSQL += ",SZZLXSLV";
                   strValueSQL += ",'" + model.SZZLXSLV.Replace("'","''") + "'";
              }

              if(model.Changed("SZYLXSLV") == true)
              {
                   strFieldSQL += ",SZYLXSLV";
                   strValueSQL += ",'" + model.SZYLXSLV.Replace("'","''") + "'";
              }

              if(model.Changed("SZXSLVC") == true)
              {
                   strFieldSQL += ",SZXSLVC";
                   strValueSQL += ",'" + model.SZXSLVC.Replace("'","''") + "'";
              }

              if(model.Changed("SZZLXSLV_PD") == true)
              {
                   strFieldSQL += ",SZZLXSLV_PD";
                   strValueSQL += ",'" + model.SZZLXSLV_PD.Replace("'","''") + "'";
              }

              if(model.Changed("SZYLXSLV_PD") == true)
              {
                   strFieldSQL += ",SZYLXSLV_PD";
                   strValueSQL += ",'" + model.SZYLXSLV_PD.Replace("'","''") + "'";
              }

              if(model.Changed("SZXSLVC_PD") == true)
              {
                   strFieldSQL += ",SZXSLVC_PD";
                   strValueSQL += ",'" + model.SZXSLVC_PD.Replace("'","''") + "'";
              }

              if(model.Changed("SZ_PD") == true)
              {
                   strFieldSQL += ",SZ_PD";
                   strValueSQL += ",'" + model.SZ_PD.Replace("'","''") + "'";
              }

              string strSql = "";
              strSql += "insert into RESULT_SUSPENSION";
              strSql += "(";
              strSql += strFieldSQL.Substring(1);
              strSql += ")";
              strSql += " values";
              strSql += "(";
              strSql += strValueSQL.Substring(1);
              strSql += ")";

              return strSql;
          }

          /// <summary>
          /// 添加一条数据
          /// </summary>
          public bool Insert(RESULT_SUSPENSION model)
          {
              return DbHelper.ExecuteSql(InsertSQL(model));
          }

          /// <summary>
          /// 修改一条数据 SQL
          /// </summary>
          public string UpdateSQL(RESULT_SUSPENSION model,string strJCLSH)
          {
              string strUpdateSQL = "";

              if(model.Changed("ID") == true)
              {
                  strUpdateSQL += ",ID=" + model.ID + "";
              }

              if(model.Changed("XJJCCS") == true)
              {
                  strUpdateSQL += ",XJJCCS='" + model.XJJCCS.Replace("'","''") + "'";
              }

              if(model.Changed("JCLSH") == true)
              {
                  strUpdateSQL += ",JCLSH='" + model.JCLSH.Replace("'","''") + "'";
              }

              if(model.Changed("QZZLJTJDL") == true)
              {
                  strUpdateSQL += ",QZZLJTJDL='" + model.QZZLJTJDL.Replace("'","''") + "'";
              }

              if(model.Changed("QZZLDTJDL") == true)
              {
                  strUpdateSQL += ",QZZLDTJDL='" + model.QZZLDTJDL.Replace("'","''") + "'";
              }

              if(model.Changed("QZZLXSLV") == true)
              {
                  strUpdateSQL += ",QZZLXSLV='" + model.QZZLXSLV.Replace("'","''") + "'";
              }

              if(model.Changed("QZZLXSLV_PD") == true)
              {
                  strUpdateSQL += ",QZZLXSLV_PD='" + model.QZZLXSLV_PD.Replace("'","''") + "'";
              }

              if(model.Changed("QZYLJTJDL") == true)
              {
                  strUpdateSQL += ",QZYLJTJDL='" + model.QZYLJTJDL.Replace("'","''") + "'";
              }

              if(model.Changed("QZYLDTJDL") == true)
              {
                  strUpdateSQL += ",QZYLDTJDL='" + model.QZYLDTJDL.Replace("'","''") + "'";
              }

              if(model.Changed("QZYLXSLV") == true)
              {
                  strUpdateSQL += ",QZYLXSLV='" + model.QZYLXSLV.Replace("'","''") + "'";
              }

              if(model.Changed("QZYLXSLV_PD") == true)
              {
                  strUpdateSQL += ",QZYLXSLV_PD='" + model.QZYLXSLV_PD.Replace("'","''") + "'";
              }

              if(model.Changed("QZXSLVC") == true)
              {
                  strUpdateSQL += ",QZXSLVC='" + model.QZXSLVC.Replace("'","''") + "'";
              }

              if(model.Changed("QZXSLVC_PD") == true)
              {
                  strUpdateSQL += ",QZXSLVC_PD='" + model.QZXSLVC_PD.Replace("'","''") + "'";
              }

              if(model.Changed("HZZLJTJDL") == true)
              {
                  strUpdateSQL += ",HZZLJTJDL='" + model.HZZLJTJDL.Replace("'","''") + "'";
              }

              if(model.Changed("HZZLDTJDL") == true)
              {
                  strUpdateSQL += ",HZZLDTJDL='" + model.HZZLDTJDL.Replace("'","''") + "'";
              }

              if(model.Changed("HZZLXSLV") == true)
              {
                  strUpdateSQL += ",HZZLXSLV='" + model.HZZLXSLV.Replace("'","''") + "'";
              }

              if(model.Changed("HZZLXSLV_PD") == true)
              {
                  strUpdateSQL += ",HZZLXSLV_PD='" + model.HZZLXSLV_PD.Replace("'","''") + "'";
              }

              if(model.Changed("HZYLJTJDL") == true)
              {
                  strUpdateSQL += ",HZYLJTJDL='" + model.HZYLJTJDL.Replace("'","''") + "'";
              }

              if(model.Changed("HZYLDTJDL") == true)
              {
                  strUpdateSQL += ",HZYLDTJDL='" + model.HZYLDTJDL.Replace("'","''") + "'";
              }

              if(model.Changed("HZYLXSLV") == true)
              {
                  strUpdateSQL += ",HZYLXSLV='" + model.HZYLXSLV.Replace("'","''") + "'";
              }

              if(model.Changed("HZYLXSLV_PD") == true)
              {
                  strUpdateSQL += ",HZYLXSLV_PD='" + model.HZYLXSLV_PD.Replace("'","''") + "'";
              }

              if(model.Changed("HZXSLVC") == true)
              {
                  strUpdateSQL += ",HZXSLVC='" + model.HZXSLVC.Replace("'","''") + "'";
              }

              if(model.Changed("HZXSLVC_PD") == true)
              {
                  strUpdateSQL += ",HZXSLVC_PD='" + model.HZXSLVC_PD.Replace("'","''") + "'";
              }

              if(model.Changed("QZ_PD") == true)
              {
                  strUpdateSQL += ",QZ_PD='" + model.QZ_PD.Replace("'","''") + "'";
              }

              if(model.Changed("HZ_PD") == true)
              {
                  strUpdateSQL += ",HZ_PD='" + model.HZ_PD.Replace("'","''") + "'";
              }

              if(model.Changed("XJ_PD") == true)
              {
                  strUpdateSQL += ",XJ_PD='" + model.XJ_PD.Replace("'","''") + "'";
              }

              if(model.Changed("QZXSLVXZXX") == true)
              {
                  strUpdateSQL += ",QZXSLVXZXX='" + model.QZXSLVXZXX.Replace("'","''") + "'";
              }

              if(model.Changed("QZXSLVXZSX") == true)
              {
                  strUpdateSQL += ",QZXSLVXZSX='" + model.QZXSLVXZSX.Replace("'","''") + "'";
              }

              if(model.Changed("QZXSLVCXZXX") == true)
              {
                  strUpdateSQL += ",QZXSLVCXZXX='" + model.QZXSLVCXZXX.Replace("'","''") + "'";
              }

              if(model.Changed("QZXSLVCXZSX") == true)
              {
                  strUpdateSQL += ",QZXSLVCXZSX='" + model.QZXSLVCXZSX.Replace("'","''") + "'";
              }

              if(model.Changed("HZXSLVXZXX") == true)
              {
                  strUpdateSQL += ",HZXSLVXZXX='" + model.HZXSLVXZXX.Replace("'","''") + "'";
              }

              if(model.Changed("HZXSLVXZSX") == true)
              {
                  strUpdateSQL += ",HZXSLVXZSX='" + model.HZXSLVXZSX.Replace("'","''") + "'";
              }

              if(model.Changed("HZXSLVCXZXX") == true)
              {
                  strUpdateSQL += ",HZXSLVCXZXX='" + model.HZXSLVCXZXX.Replace("'","''") + "'";
              }

              if(model.Changed("HZXSLVCXZSX") == true)
              {
                  strUpdateSQL += ",HZXSLVCXZSX='" + model.HZXSLVCXZSX.Replace("'","''") + "'";
              }

              if(model.Changed("SZZLJTJDL") == true)
              {
                  strUpdateSQL += ",SZZLJTJDL='" + model.SZZLJTJDL.Replace("'","''") + "'";
              }

              if(model.Changed("SZYLJTJDL") == true)
              {
                  strUpdateSQL += ",SZYLJTJDL='" + model.SZYLJTJDL.Replace("'","''") + "'";
              }

              if(model.Changed("SZZLDTJDL") == true)
              {
                  strUpdateSQL += ",SZZLDTJDL='" + model.SZZLDTJDL.Replace("'","''") + "'";
              }

              if(model.Changed("SZYLDTJDL") == true)
              {
                  strUpdateSQL += ",SZYLDTJDL='" + model.SZYLDTJDL.Replace("'","''") + "'";
              }

              if(model.Changed("SZZLXSLV") == true)
              {
                  strUpdateSQL += ",SZZLXSLV='" + model.SZZLXSLV.Replace("'","''") + "'";
              }

              if(model.Changed("SZYLXSLV") == true)
              {
                  strUpdateSQL += ",SZYLXSLV='" + model.SZYLXSLV.Replace("'","''") + "'";
              }

              if(model.Changed("SZXSLVC") == true)
              {
                  strUpdateSQL += ",SZXSLVC='" + model.SZXSLVC.Replace("'","''") + "'";
              }

              if(model.Changed("SZZLXSLV_PD") == true)
              {
                  strUpdateSQL += ",SZZLXSLV_PD='" + model.SZZLXSLV_PD.Replace("'","''") + "'";
              }

              if(model.Changed("SZYLXSLV_PD") == true)
              {
                  strUpdateSQL += ",SZYLXSLV_PD='" + model.SZYLXSLV_PD.Replace("'","''") + "'";
              }

              if(model.Changed("SZXSLVC_PD") == true)
              {
                  strUpdateSQL += ",SZXSLVC_PD='" + model.SZXSLVC_PD.Replace("'","''") + "'";
              }

              if(model.Changed("SZ_PD") == true)
              {
                  strUpdateSQL += ",SZ_PD='" + model.SZ_PD.Replace("'","''") + "'";
              }

               string strSql = "";
               strSql += "update RESULT_SUSPENSION set ";
               strSql += strUpdateSQL.Substring(1);
               strSql += " where ";
               strSql += " JCLSH='"+ strJCLSH +"'";

               return strSql;
          }

          /// <summary>
          /// 修改一条数据
          /// </summary>
          public bool Update(RESULT_SUSPENSION model, string strJCLSH)
          {
              return DbHelper.ExecuteSql(UpdateSQL(model, strJCLSH));
          }

          /// <summary>
          /// 修改一个集合 SQL
          /// </summary>
           public string UpdateRangeSQL(RESULT_SUSPENSION model, string p_strWhere)
          {
               string strUpdateSQL = "";

               if(model.Changed("ID") == true)
               {
                  strUpdateSQL += ",ID=" + model.ID + "";
               }

               if(model.Changed("XJJCCS") == true)
               {
                  strUpdateSQL += ",XJJCCS='" + model.XJJCCS.Replace("'","''") + "'";
               }

               if(model.Changed("JCLSH") == true)
               {
                  strUpdateSQL += ",JCLSH='" + model.JCLSH.Replace("'","''") + "'";
               }

               if(model.Changed("QZZLJTJDL") == true)
               {
                  strUpdateSQL += ",QZZLJTJDL='" + model.QZZLJTJDL.Replace("'","''") + "'";
               }

               if(model.Changed("QZZLDTJDL") == true)
               {
                  strUpdateSQL += ",QZZLDTJDL='" + model.QZZLDTJDL.Replace("'","''") + "'";
               }

               if(model.Changed("QZZLXSLV") == true)
               {
                  strUpdateSQL += ",QZZLXSLV='" + model.QZZLXSLV.Replace("'","''") + "'";
               }

               if(model.Changed("QZZLXSLV_PD") == true)
               {
                  strUpdateSQL += ",QZZLXSLV_PD='" + model.QZZLXSLV_PD.Replace("'","''") + "'";
               }

               if(model.Changed("QZYLJTJDL") == true)
               {
                  strUpdateSQL += ",QZYLJTJDL='" + model.QZYLJTJDL.Replace("'","''") + "'";
               }

               if(model.Changed("QZYLDTJDL") == true)
               {
                  strUpdateSQL += ",QZYLDTJDL='" + model.QZYLDTJDL.Replace("'","''") + "'";
               }

               if(model.Changed("QZYLXSLV") == true)
               {
                  strUpdateSQL += ",QZYLXSLV='" + model.QZYLXSLV.Replace("'","''") + "'";
               }

               if(model.Changed("QZYLXSLV_PD") == true)
               {
                  strUpdateSQL += ",QZYLXSLV_PD='" + model.QZYLXSLV_PD.Replace("'","''") + "'";
               }

               if(model.Changed("QZXSLVC") == true)
               {
                  strUpdateSQL += ",QZXSLVC='" + model.QZXSLVC.Replace("'","''") + "'";
               }

               if(model.Changed("QZXSLVC_PD") == true)
               {
                  strUpdateSQL += ",QZXSLVC_PD='" + model.QZXSLVC_PD.Replace("'","''") + "'";
               }

               if(model.Changed("HZZLJTJDL") == true)
               {
                  strUpdateSQL += ",HZZLJTJDL='" + model.HZZLJTJDL.Replace("'","''") + "'";
               }

               if(model.Changed("HZZLDTJDL") == true)
               {
                  strUpdateSQL += ",HZZLDTJDL='" + model.HZZLDTJDL.Replace("'","''") + "'";
               }

               if(model.Changed("HZZLXSLV") == true)
               {
                  strUpdateSQL += ",HZZLXSLV='" + model.HZZLXSLV.Replace("'","''") + "'";
               }

               if(model.Changed("HZZLXSLV_PD") == true)
               {
                  strUpdateSQL += ",HZZLXSLV_PD='" + model.HZZLXSLV_PD.Replace("'","''") + "'";
               }

               if(model.Changed("HZYLJTJDL") == true)
               {
                  strUpdateSQL += ",HZYLJTJDL='" + model.HZYLJTJDL.Replace("'","''") + "'";
               }

               if(model.Changed("HZYLDTJDL") == true)
               {
                  strUpdateSQL += ",HZYLDTJDL='" + model.HZYLDTJDL.Replace("'","''") + "'";
               }

               if(model.Changed("HZYLXSLV") == true)
               {
                  strUpdateSQL += ",HZYLXSLV='" + model.HZYLXSLV.Replace("'","''") + "'";
               }

               if(model.Changed("HZYLXSLV_PD") == true)
               {
                  strUpdateSQL += ",HZYLXSLV_PD='" + model.HZYLXSLV_PD.Replace("'","''") + "'";
               }

               if(model.Changed("HZXSLVC") == true)
               {
                  strUpdateSQL += ",HZXSLVC='" + model.HZXSLVC.Replace("'","''") + "'";
               }

               if(model.Changed("HZXSLVC_PD") == true)
               {
                  strUpdateSQL += ",HZXSLVC_PD='" + model.HZXSLVC_PD.Replace("'","''") + "'";
               }

               if(model.Changed("QZ_PD") == true)
               {
                  strUpdateSQL += ",QZ_PD='" + model.QZ_PD.Replace("'","''") + "'";
               }

               if(model.Changed("HZ_PD") == true)
               {
                  strUpdateSQL += ",HZ_PD='" + model.HZ_PD.Replace("'","''") + "'";
               }

               if(model.Changed("XJ_PD") == true)
               {
                  strUpdateSQL += ",XJ_PD='" + model.XJ_PD.Replace("'","''") + "'";
               }

               if(model.Changed("QZXSLVXZXX") == true)
               {
                  strUpdateSQL += ",QZXSLVXZXX='" + model.QZXSLVXZXX.Replace("'","''") + "'";
               }

               if(model.Changed("QZXSLVXZSX") == true)
               {
                  strUpdateSQL += ",QZXSLVXZSX='" + model.QZXSLVXZSX.Replace("'","''") + "'";
               }

               if(model.Changed("QZXSLVCXZXX") == true)
               {
                  strUpdateSQL += ",QZXSLVCXZXX='" + model.QZXSLVCXZXX.Replace("'","''") + "'";
               }

               if(model.Changed("QZXSLVCXZSX") == true)
               {
                  strUpdateSQL += ",QZXSLVCXZSX='" + model.QZXSLVCXZSX.Replace("'","''") + "'";
               }

               if(model.Changed("HZXSLVXZXX") == true)
               {
                  strUpdateSQL += ",HZXSLVXZXX='" + model.HZXSLVXZXX.Replace("'","''") + "'";
               }

               if(model.Changed("HZXSLVXZSX") == true)
               {
                  strUpdateSQL += ",HZXSLVXZSX='" + model.HZXSLVXZSX.Replace("'","''") + "'";
               }

               if(model.Changed("HZXSLVCXZXX") == true)
               {
                  strUpdateSQL += ",HZXSLVCXZXX='" + model.HZXSLVCXZXX.Replace("'","''") + "'";
               }

               if(model.Changed("HZXSLVCXZSX") == true)
               {
                  strUpdateSQL += ",HZXSLVCXZSX='" + model.HZXSLVCXZSX.Replace("'","''") + "'";
               }

               if(model.Changed("SZZLJTJDL") == true)
               {
                  strUpdateSQL += ",SZZLJTJDL='" + model.SZZLJTJDL.Replace("'","''") + "'";
               }

               if(model.Changed("SZYLJTJDL") == true)
               {
                  strUpdateSQL += ",SZYLJTJDL='" + model.SZYLJTJDL.Replace("'","''") + "'";
               }

               if(model.Changed("SZZLDTJDL") == true)
               {
                  strUpdateSQL += ",SZZLDTJDL='" + model.SZZLDTJDL.Replace("'","''") + "'";
               }

               if(model.Changed("SZYLDTJDL") == true)
               {
                  strUpdateSQL += ",SZYLDTJDL='" + model.SZYLDTJDL.Replace("'","''") + "'";
               }

               if(model.Changed("SZZLXSLV") == true)
               {
                  strUpdateSQL += ",SZZLXSLV='" + model.SZZLXSLV.Replace("'","''") + "'";
               }

               if(model.Changed("SZYLXSLV") == true)
               {
                  strUpdateSQL += ",SZYLXSLV='" + model.SZYLXSLV.Replace("'","''") + "'";
               }

               if(model.Changed("SZXSLVC") == true)
               {
                  strUpdateSQL += ",SZXSLVC='" + model.SZXSLVC.Replace("'","''") + "'";
               }

               if(model.Changed("SZZLXSLV_PD") == true)
               {
                  strUpdateSQL += ",SZZLXSLV_PD='" + model.SZZLXSLV_PD.Replace("'","''") + "'";
               }

               if(model.Changed("SZYLXSLV_PD") == true)
               {
                  strUpdateSQL += ",SZYLXSLV_PD='" + model.SZYLXSLV_PD.Replace("'","''") + "'";
               }

               if(model.Changed("SZXSLVC_PD") == true)
               {
                  strUpdateSQL += ",SZXSLVC_PD='" + model.SZXSLVC_PD.Replace("'","''") + "'";
               }

               if(model.Changed("SZ_PD") == true)
               {
                  strUpdateSQL += ",SZ_PD='" + model.SZ_PD.Replace("'","''") + "'";
               }

              string strSql = "";
              strSql += "update RESULT_SUSPENSION set ";
              strSql += strUpdateSQL.Substring(1);
              strSql += " where " + p_strWhere;

              return strSql;
          }

          /// <summary>
          /// 修改一个集合
          /// </summary>
          public bool UpdateRange(RESULT_SUSPENSION model, string p_strWhere)
          {
              return DbHelper.ExecuteSql(UpdateRangeSQL(model, p_strWhere));
          }

          /// <summary>
          /// 修改全部数据 SQL
          /// </summary>
          public string UpdateAllSQL(RESULT_SUSPENSION model)
          {
              string strUpdateSQL = "";

                  strUpdateSQL += ",ID=" + model.ID + "";
                  strUpdateSQL += ",XJJCCS='" + model.XJJCCS.Replace("'","''") + "'";
                  strUpdateSQL += ",JCLSH='" + model.JCLSH.Replace("'","''") + "'";
                  strUpdateSQL += ",QZZLJTJDL='" + model.QZZLJTJDL.Replace("'","''") + "'";
                  strUpdateSQL += ",QZZLDTJDL='" + model.QZZLDTJDL.Replace("'","''") + "'";
                  strUpdateSQL += ",QZZLXSLV='" + model.QZZLXSLV.Replace("'","''") + "'";
                  strUpdateSQL += ",QZZLXSLV_PD='" + model.QZZLXSLV_PD.Replace("'","''") + "'";
                  strUpdateSQL += ",QZYLJTJDL='" + model.QZYLJTJDL.Replace("'","''") + "'";
                  strUpdateSQL += ",QZYLDTJDL='" + model.QZYLDTJDL.Replace("'","''") + "'";
                  strUpdateSQL += ",QZYLXSLV='" + model.QZYLXSLV.Replace("'","''") + "'";
                  strUpdateSQL += ",QZYLXSLV_PD='" + model.QZYLXSLV_PD.Replace("'","''") + "'";
                  strUpdateSQL += ",QZXSLVC='" + model.QZXSLVC.Replace("'","''") + "'";
                  strUpdateSQL += ",QZXSLVC_PD='" + model.QZXSLVC_PD.Replace("'","''") + "'";
                  strUpdateSQL += ",HZZLJTJDL='" + model.HZZLJTJDL.Replace("'","''") + "'";
                  strUpdateSQL += ",HZZLDTJDL='" + model.HZZLDTJDL.Replace("'","''") + "'";
                  strUpdateSQL += ",HZZLXSLV='" + model.HZZLXSLV.Replace("'","''") + "'";
                  strUpdateSQL += ",HZZLXSLV_PD='" + model.HZZLXSLV_PD.Replace("'","''") + "'";
                  strUpdateSQL += ",HZYLJTJDL='" + model.HZYLJTJDL.Replace("'","''") + "'";
                  strUpdateSQL += ",HZYLDTJDL='" + model.HZYLDTJDL.Replace("'","''") + "'";
                  strUpdateSQL += ",HZYLXSLV='" + model.HZYLXSLV.Replace("'","''") + "'";
                  strUpdateSQL += ",HZYLXSLV_PD='" + model.HZYLXSLV_PD.Replace("'","''") + "'";
                  strUpdateSQL += ",HZXSLVC='" + model.HZXSLVC.Replace("'","''") + "'";
                  strUpdateSQL += ",HZXSLVC_PD='" + model.HZXSLVC_PD.Replace("'","''") + "'";
                  strUpdateSQL += ",QZ_PD='" + model.QZ_PD.Replace("'","''") + "'";
                  strUpdateSQL += ",HZ_PD='" + model.HZ_PD.Replace("'","''") + "'";
                  strUpdateSQL += ",XJ_PD='" + model.XJ_PD.Replace("'","''") + "'";
                  strUpdateSQL += ",QZXSLVXZXX='" + model.QZXSLVXZXX.Replace("'","''") + "'";
                  strUpdateSQL += ",QZXSLVXZSX='" + model.QZXSLVXZSX.Replace("'","''") + "'";
                  strUpdateSQL += ",QZXSLVCXZXX='" + model.QZXSLVCXZXX.Replace("'","''") + "'";
                  strUpdateSQL += ",QZXSLVCXZSX='" + model.QZXSLVCXZSX.Replace("'","''") + "'";
                  strUpdateSQL += ",HZXSLVXZXX='" + model.HZXSLVXZXX.Replace("'","''") + "'";
                  strUpdateSQL += ",HZXSLVXZSX='" + model.HZXSLVXZSX.Replace("'","''") + "'";
                  strUpdateSQL += ",HZXSLVCXZXX='" + model.HZXSLVCXZXX.Replace("'","''") + "'";
                  strUpdateSQL += ",HZXSLVCXZSX='" + model.HZXSLVCXZSX.Replace("'","''") + "'";
                  strUpdateSQL += ",SZZLJTJDL='" + model.SZZLJTJDL.Replace("'","''") + "'";
                  strUpdateSQL += ",SZYLJTJDL='" + model.SZYLJTJDL.Replace("'","''") + "'";
                  strUpdateSQL += ",SZZLDTJDL='" + model.SZZLDTJDL.Replace("'","''") + "'";
                  strUpdateSQL += ",SZYLDTJDL='" + model.SZYLDTJDL.Replace("'","''") + "'";
                  strUpdateSQL += ",SZZLXSLV='" + model.SZZLXSLV.Replace("'","''") + "'";
                  strUpdateSQL += ",SZYLXSLV='" + model.SZYLXSLV.Replace("'","''") + "'";
                  strUpdateSQL += ",SZXSLVC='" + model.SZXSLVC.Replace("'","''") + "'";
                  strUpdateSQL += ",SZZLXSLV_PD='" + model.SZZLXSLV_PD.Replace("'","''") + "'";
                  strUpdateSQL += ",SZYLXSLV_PD='" + model.SZYLXSLV_PD.Replace("'","''") + "'";
                  strUpdateSQL += ",SZXSLVC_PD='" + model.SZXSLVC_PD.Replace("'","''") + "'";
                  strUpdateSQL += ",SZ_PD='" + model.SZ_PD.Replace("'","''") + "'";


               string strSql = "";
               strSql += "update RESULT_SUSPENSION set ";
               strSql += strUpdateSQL.Substring(1);

               return strSql;

          }

          /// <summary>
          /// 修改全部数据
          /// </summary>
          public bool UpdateAll(RESULT_SUSPENSION model)
          {
              return DbHelper.ExecuteSql(UpdateAllSQL(model));
          }

          /// <summary>
          /// 删除一条数据 SQL
          /// </summary>
          public string DeleteSQL(string strJCLSH)
          {
              string strSql = "";
              strSql += "delete from RESULT_SUSPENSION";
              strSql += " where ";
               strSql += " JCLSH='"+ strJCLSH +"'";

              return strSql;

          }

          /// <summary>
          /// 删除一条数据
          /// </summary>
          public bool Delete(string strJCLSH)
          {
              return DbHelper.ExecuteSql(DeleteSQL(strJCLSH));
          }

          /// <summary>
          /// 删除一个集合 SQL
          /// </summary>
          public string DeleteRangeSQL(string p_strWhere)
          {
              string strSql = "";
              strSql += "delete from RESULT_SUSPENSION";
              strSql += " where " + p_strWhere;

              return strSql;
           }

          /// <summary>
          /// 删除一个集合
          /// </summary>
          public bool DeleteRange(string p_strWhere)
          {
              return DbHelper.ExecuteSql(DeleteRangeSQL(p_strWhere));
          }

          /// <summary>
          /// 删除全部 SQL
          /// </summary>
          public string DeleteAllSQL()
          {
              string strSql = "";
              strSql += "delete from RESULT_SUSPENSION";

              return strSql;
           }

         /// <summary>
         /// 删除全部
         /// </summary>
         public bool DeleteAll()
         {
             return DbHelper.ExecuteSql(DeleteAllSQL());
         }

          /// <summary>
         /// 得到一个对象实体
         /// </summary>
         public RESULT_SUSPENSION GetModel(string strJCLSH)
         {
             string strSql = "";
             strSql += "select * from RESULT_SUSPENSION";
             strSql += " where ";
               strSql += " JCLSH='"+ strJCLSH +"'";

             DataTable dtTemp = new DataTable();
             DbHelper.GetTable(strSql, ref dtTemp);

             RESULT_SUSPENSION model = new RESULT_SUSPENSION();

             if(dtTemp.Rows.Count>0)
             {
                 model = new RESULT_SUSPENSION();

                 model.ID = dtTemp.Rows[0]["ID"] == DBNull.Value ? 0 : Convert.ToInt32(dtTemp.Rows[0]["ID"]);
                 model.XJJCCS = dtTemp.Rows[0]["XJJCCS"] == DBNull.Value ? "" : dtTemp.Rows[0]["XJJCCS"].ToString();
                 model.JCLSH = dtTemp.Rows[0]["JCLSH"] == DBNull.Value ? "" : dtTemp.Rows[0]["JCLSH"].ToString();
                 model.QZZLJTJDL = dtTemp.Rows[0]["QZZLJTJDL"] == DBNull.Value ? "" : dtTemp.Rows[0]["QZZLJTJDL"].ToString();
                 model.QZZLDTJDL = dtTemp.Rows[0]["QZZLDTJDL"] == DBNull.Value ? "" : dtTemp.Rows[0]["QZZLDTJDL"].ToString();
                 model.QZZLXSLV = dtTemp.Rows[0]["QZZLXSLV"] == DBNull.Value ? "" : dtTemp.Rows[0]["QZZLXSLV"].ToString();
                 model.QZZLXSLV_PD = dtTemp.Rows[0]["QZZLXSLV_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["QZZLXSLV_PD"].ToString();
                 model.QZYLJTJDL = dtTemp.Rows[0]["QZYLJTJDL"] == DBNull.Value ? "" : dtTemp.Rows[0]["QZYLJTJDL"].ToString();
                 model.QZYLDTJDL = dtTemp.Rows[0]["QZYLDTJDL"] == DBNull.Value ? "" : dtTemp.Rows[0]["QZYLDTJDL"].ToString();
                 model.QZYLXSLV = dtTemp.Rows[0]["QZYLXSLV"] == DBNull.Value ? "" : dtTemp.Rows[0]["QZYLXSLV"].ToString();
                 model.QZYLXSLV_PD = dtTemp.Rows[0]["QZYLXSLV_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["QZYLXSLV_PD"].ToString();
                 model.QZXSLVC = dtTemp.Rows[0]["QZXSLVC"] == DBNull.Value ? "" : dtTemp.Rows[0]["QZXSLVC"].ToString();
                 model.QZXSLVC_PD = dtTemp.Rows[0]["QZXSLVC_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["QZXSLVC_PD"].ToString();
                 model.HZZLJTJDL = dtTemp.Rows[0]["HZZLJTJDL"] == DBNull.Value ? "" : dtTemp.Rows[0]["HZZLJTJDL"].ToString();
                 model.HZZLDTJDL = dtTemp.Rows[0]["HZZLDTJDL"] == DBNull.Value ? "" : dtTemp.Rows[0]["HZZLDTJDL"].ToString();
                 model.HZZLXSLV = dtTemp.Rows[0]["HZZLXSLV"] == DBNull.Value ? "" : dtTemp.Rows[0]["HZZLXSLV"].ToString();
                 model.HZZLXSLV_PD = dtTemp.Rows[0]["HZZLXSLV_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["HZZLXSLV_PD"].ToString();
                 model.HZYLJTJDL = dtTemp.Rows[0]["HZYLJTJDL"] == DBNull.Value ? "" : dtTemp.Rows[0]["HZYLJTJDL"].ToString();
                 model.HZYLDTJDL = dtTemp.Rows[0]["HZYLDTJDL"] == DBNull.Value ? "" : dtTemp.Rows[0]["HZYLDTJDL"].ToString();
                 model.HZYLXSLV = dtTemp.Rows[0]["HZYLXSLV"] == DBNull.Value ? "" : dtTemp.Rows[0]["HZYLXSLV"].ToString();
                 model.HZYLXSLV_PD = dtTemp.Rows[0]["HZYLXSLV_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["HZYLXSLV_PD"].ToString();
                 model.HZXSLVC = dtTemp.Rows[0]["HZXSLVC"] == DBNull.Value ? "" : dtTemp.Rows[0]["HZXSLVC"].ToString();
                 model.HZXSLVC_PD = dtTemp.Rows[0]["HZXSLVC_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["HZXSLVC_PD"].ToString();
                 model.QZ_PD = dtTemp.Rows[0]["QZ_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["QZ_PD"].ToString();
                 model.HZ_PD = dtTemp.Rows[0]["HZ_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["HZ_PD"].ToString();
                 model.XJ_PD = dtTemp.Rows[0]["XJ_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["XJ_PD"].ToString();
                 model.QZXSLVXZXX = dtTemp.Rows[0]["QZXSLVXZXX"] == DBNull.Value ? "" : dtTemp.Rows[0]["QZXSLVXZXX"].ToString();
                 model.QZXSLVXZSX = dtTemp.Rows[0]["QZXSLVXZSX"] == DBNull.Value ? "" : dtTemp.Rows[0]["QZXSLVXZSX"].ToString();
                 model.QZXSLVCXZXX = dtTemp.Rows[0]["QZXSLVCXZXX"] == DBNull.Value ? "" : dtTemp.Rows[0]["QZXSLVCXZXX"].ToString();
                 model.QZXSLVCXZSX = dtTemp.Rows[0]["QZXSLVCXZSX"] == DBNull.Value ? "" : dtTemp.Rows[0]["QZXSLVCXZSX"].ToString();
                 model.HZXSLVXZXX = dtTemp.Rows[0]["HZXSLVXZXX"] == DBNull.Value ? "" : dtTemp.Rows[0]["HZXSLVXZXX"].ToString();
                 model.HZXSLVXZSX = dtTemp.Rows[0]["HZXSLVXZSX"] == DBNull.Value ? "" : dtTemp.Rows[0]["HZXSLVXZSX"].ToString();
                 model.HZXSLVCXZXX = dtTemp.Rows[0]["HZXSLVCXZXX"] == DBNull.Value ? "" : dtTemp.Rows[0]["HZXSLVCXZXX"].ToString();
                 model.HZXSLVCXZSX = dtTemp.Rows[0]["HZXSLVCXZSX"] == DBNull.Value ? "" : dtTemp.Rows[0]["HZXSLVCXZSX"].ToString();
                 model.SZZLJTJDL = dtTemp.Rows[0]["SZZLJTJDL"] == DBNull.Value ? "" : dtTemp.Rows[0]["SZZLJTJDL"].ToString();
                 model.SZYLJTJDL = dtTemp.Rows[0]["SZYLJTJDL"] == DBNull.Value ? "" : dtTemp.Rows[0]["SZYLJTJDL"].ToString();
                 model.SZZLDTJDL = dtTemp.Rows[0]["SZZLDTJDL"] == DBNull.Value ? "" : dtTemp.Rows[0]["SZZLDTJDL"].ToString();
                 model.SZYLDTJDL = dtTemp.Rows[0]["SZYLDTJDL"] == DBNull.Value ? "" : dtTemp.Rows[0]["SZYLDTJDL"].ToString();
                 model.SZZLXSLV = dtTemp.Rows[0]["SZZLXSLV"] == DBNull.Value ? "" : dtTemp.Rows[0]["SZZLXSLV"].ToString();
                 model.SZYLXSLV = dtTemp.Rows[0]["SZYLXSLV"] == DBNull.Value ? "" : dtTemp.Rows[0]["SZYLXSLV"].ToString();
                 model.SZXSLVC = dtTemp.Rows[0]["SZXSLVC"] == DBNull.Value ? "" : dtTemp.Rows[0]["SZXSLVC"].ToString();
                 model.SZZLXSLV_PD = dtTemp.Rows[0]["SZZLXSLV_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["SZZLXSLV_PD"].ToString();
                 model.SZYLXSLV_PD = dtTemp.Rows[0]["SZYLXSLV_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["SZYLXSLV_PD"].ToString();
                 model.SZXSLVC_PD = dtTemp.Rows[0]["SZXSLVC_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["SZXSLVC_PD"].ToString();
                 model.SZ_PD = dtTemp.Rows[0]["SZ_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["SZ_PD"].ToString();
             }

             dtTemp.Dispose();

             return model;
         }

         /// <summary>
         /// 得到一个对象实体
         /// </summary>
         public void GetModel(ref DataTable p_dtData, string strJCLSH)
         {
             p_dtData.Clear();

             string strSql = "";
             strSql += "select * from RESULT_SUSPENSION";
             strSql += " where ";
               strSql += " JCLSH='"+ strJCLSH +"'";

              DbHelper.GetTable(strSql, ref p_dtData);
         }

      /// <summary>
      /// 得到对象集合
      /// </summary>
      public RESULT_SUSPENSION[] GetModelList(string p_strWhere, string p_strOrder, int p_intPageNumber, int p_intPageSize)
      {
          int m_intPageNumber = p_intPageNumber;
          int m_intPageCount = GetPageCount(p_strWhere, p_intPageSize);

          if((m_intPageNumber < 1) || (m_intPageNumber == 0))
          {
               m_intPageNumber = 1;
          }

          if(m_intPageNumber == -1)
          {
               m_intPageNumber = m_intPageCount;
          }

          if(m_intPageNumber > m_intPageCount)
          {
               m_intPageNumber = m_intPageCount;
          }

          string strSql = "";
          strSql += "select * from RESULT_SUSPENSION";
          if(p_strWhere.Trim().Length > 0)
          {
               strSql += " where " + p_strWhere;
          }
          if(p_strOrder.Trim().Length > 0)
          {
               strSql += " order by " + p_strOrder;
          }

          DataTable dtTemp = new DataTable();

          if(p_intPageSize > 0)
          {
               DbHelper.GetTable(strSql, ref dtTemp, (m_intPageNumber-1)*p_intPageSize, p_intPageSize);
          }
          else
          {
               DbHelper.GetTable(strSql, ref dtTemp);
          }

          RESULT_SUSPENSION[] arrModel=new RESULT_SUSPENSION[dtTemp.Rows.Count];

          for(int N=0;N<dtTemp.Rows.Count;N++)
          {
               arrModel[N] = new RESULT_SUSPENSION();

                 arrModel[N].ID = dtTemp.Rows[N]["ID"] == DBNull.Value ? 0 : Convert.ToInt32(dtTemp.Rows[N]["ID"]);
                 arrModel[N].XJJCCS = dtTemp.Rows[N]["XJJCCS"] == DBNull.Value ? "" : dtTemp.Rows[N]["XJJCCS"].ToString();
                 arrModel[N].JCLSH = dtTemp.Rows[N]["JCLSH"] == DBNull.Value ? "" : dtTemp.Rows[N]["JCLSH"].ToString();
                 arrModel[N].QZZLJTJDL = dtTemp.Rows[N]["QZZLJTJDL"] == DBNull.Value ? "" : dtTemp.Rows[N]["QZZLJTJDL"].ToString();
                 arrModel[N].QZZLDTJDL = dtTemp.Rows[N]["QZZLDTJDL"] == DBNull.Value ? "" : dtTemp.Rows[N]["QZZLDTJDL"].ToString();
                 arrModel[N].QZZLXSLV = dtTemp.Rows[N]["QZZLXSLV"] == DBNull.Value ? "" : dtTemp.Rows[N]["QZZLXSLV"].ToString();
                 arrModel[N].QZZLXSLV_PD = dtTemp.Rows[N]["QZZLXSLV_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["QZZLXSLV_PD"].ToString();
                 arrModel[N].QZYLJTJDL = dtTemp.Rows[N]["QZYLJTJDL"] == DBNull.Value ? "" : dtTemp.Rows[N]["QZYLJTJDL"].ToString();
                 arrModel[N].QZYLDTJDL = dtTemp.Rows[N]["QZYLDTJDL"] == DBNull.Value ? "" : dtTemp.Rows[N]["QZYLDTJDL"].ToString();
                 arrModel[N].QZYLXSLV = dtTemp.Rows[N]["QZYLXSLV"] == DBNull.Value ? "" : dtTemp.Rows[N]["QZYLXSLV"].ToString();
                 arrModel[N].QZYLXSLV_PD = dtTemp.Rows[N]["QZYLXSLV_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["QZYLXSLV_PD"].ToString();
                 arrModel[N].QZXSLVC = dtTemp.Rows[N]["QZXSLVC"] == DBNull.Value ? "" : dtTemp.Rows[N]["QZXSLVC"].ToString();
                 arrModel[N].QZXSLVC_PD = dtTemp.Rows[N]["QZXSLVC_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["QZXSLVC_PD"].ToString();
                 arrModel[N].HZZLJTJDL = dtTemp.Rows[N]["HZZLJTJDL"] == DBNull.Value ? "" : dtTemp.Rows[N]["HZZLJTJDL"].ToString();
                 arrModel[N].HZZLDTJDL = dtTemp.Rows[N]["HZZLDTJDL"] == DBNull.Value ? "" : dtTemp.Rows[N]["HZZLDTJDL"].ToString();
                 arrModel[N].HZZLXSLV = dtTemp.Rows[N]["HZZLXSLV"] == DBNull.Value ? "" : dtTemp.Rows[N]["HZZLXSLV"].ToString();
                 arrModel[N].HZZLXSLV_PD = dtTemp.Rows[N]["HZZLXSLV_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["HZZLXSLV_PD"].ToString();
                 arrModel[N].HZYLJTJDL = dtTemp.Rows[N]["HZYLJTJDL"] == DBNull.Value ? "" : dtTemp.Rows[N]["HZYLJTJDL"].ToString();
                 arrModel[N].HZYLDTJDL = dtTemp.Rows[N]["HZYLDTJDL"] == DBNull.Value ? "" : dtTemp.Rows[N]["HZYLDTJDL"].ToString();
                 arrModel[N].HZYLXSLV = dtTemp.Rows[N]["HZYLXSLV"] == DBNull.Value ? "" : dtTemp.Rows[N]["HZYLXSLV"].ToString();
                 arrModel[N].HZYLXSLV_PD = dtTemp.Rows[N]["HZYLXSLV_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["HZYLXSLV_PD"].ToString();
                 arrModel[N].HZXSLVC = dtTemp.Rows[N]["HZXSLVC"] == DBNull.Value ? "" : dtTemp.Rows[N]["HZXSLVC"].ToString();
                 arrModel[N].HZXSLVC_PD = dtTemp.Rows[N]["HZXSLVC_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["HZXSLVC_PD"].ToString();
                 arrModel[N].QZ_PD = dtTemp.Rows[N]["QZ_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["QZ_PD"].ToString();
                 arrModel[N].HZ_PD = dtTemp.Rows[N]["HZ_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["HZ_PD"].ToString();
                 arrModel[N].XJ_PD = dtTemp.Rows[N]["XJ_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["XJ_PD"].ToString();
                 arrModel[N].QZXSLVXZXX = dtTemp.Rows[N]["QZXSLVXZXX"] == DBNull.Value ? "" : dtTemp.Rows[N]["QZXSLVXZXX"].ToString();
                 arrModel[N].QZXSLVXZSX = dtTemp.Rows[N]["QZXSLVXZSX"] == DBNull.Value ? "" : dtTemp.Rows[N]["QZXSLVXZSX"].ToString();
                 arrModel[N].QZXSLVCXZXX = dtTemp.Rows[N]["QZXSLVCXZXX"] == DBNull.Value ? "" : dtTemp.Rows[N]["QZXSLVCXZXX"].ToString();
                 arrModel[N].QZXSLVCXZSX = dtTemp.Rows[N]["QZXSLVCXZSX"] == DBNull.Value ? "" : dtTemp.Rows[N]["QZXSLVCXZSX"].ToString();
                 arrModel[N].HZXSLVXZXX = dtTemp.Rows[N]["HZXSLVXZXX"] == DBNull.Value ? "" : dtTemp.Rows[N]["HZXSLVXZXX"].ToString();
                 arrModel[N].HZXSLVXZSX = dtTemp.Rows[N]["HZXSLVXZSX"] == DBNull.Value ? "" : dtTemp.Rows[N]["HZXSLVXZSX"].ToString();
                 arrModel[N].HZXSLVCXZXX = dtTemp.Rows[N]["HZXSLVCXZXX"] == DBNull.Value ? "" : dtTemp.Rows[N]["HZXSLVCXZXX"].ToString();
                 arrModel[N].HZXSLVCXZSX = dtTemp.Rows[N]["HZXSLVCXZSX"] == DBNull.Value ? "" : dtTemp.Rows[N]["HZXSLVCXZSX"].ToString();
                 arrModel[N].SZZLJTJDL = dtTemp.Rows[N]["SZZLJTJDL"] == DBNull.Value ? "" : dtTemp.Rows[N]["SZZLJTJDL"].ToString();
                 arrModel[N].SZYLJTJDL = dtTemp.Rows[N]["SZYLJTJDL"] == DBNull.Value ? "" : dtTemp.Rows[N]["SZYLJTJDL"].ToString();
                 arrModel[N].SZZLDTJDL = dtTemp.Rows[N]["SZZLDTJDL"] == DBNull.Value ? "" : dtTemp.Rows[N]["SZZLDTJDL"].ToString();
                 arrModel[N].SZYLDTJDL = dtTemp.Rows[N]["SZYLDTJDL"] == DBNull.Value ? "" : dtTemp.Rows[N]["SZYLDTJDL"].ToString();
                 arrModel[N].SZZLXSLV = dtTemp.Rows[N]["SZZLXSLV"] == DBNull.Value ? "" : dtTemp.Rows[N]["SZZLXSLV"].ToString();
                 arrModel[N].SZYLXSLV = dtTemp.Rows[N]["SZYLXSLV"] == DBNull.Value ? "" : dtTemp.Rows[N]["SZYLXSLV"].ToString();
                 arrModel[N].SZXSLVC = dtTemp.Rows[N]["SZXSLVC"] == DBNull.Value ? "" : dtTemp.Rows[N]["SZXSLVC"].ToString();
                 arrModel[N].SZZLXSLV_PD = dtTemp.Rows[N]["SZZLXSLV_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["SZZLXSLV_PD"].ToString();
                 arrModel[N].SZYLXSLV_PD = dtTemp.Rows[N]["SZYLXSLV_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["SZYLXSLV_PD"].ToString();
                 arrModel[N].SZXSLVC_PD = dtTemp.Rows[N]["SZXSLVC_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["SZXSLVC_PD"].ToString();
                 arrModel[N].SZ_PD = dtTemp.Rows[N]["SZ_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["SZ_PD"].ToString();
          }

          dtTemp.Dispose();

          return arrModel;
      }

      /// <summary>
      /// 得到对象集合
      /// </summary>
      public RESULT_SUSPENSION[] GetModelList(string p_strWhere)
      {
          return GetModelList(p_strWhere, "", -1, -1);
      }

      /// <summary>
      /// 得到对象集合
      /// </summary>
      public RESULT_SUSPENSION[] GetModelList(string p_strWhere, string p_strOrder)
      {
          return GetModelList(p_strWhere, p_strOrder, -1, -1);
      }

      /// <summary>
      /// 得到对象集合
      /// </summary>
      public RESULT_SUSPENSION[] GetModelList(int p_intPageNumber, int p_intPageSize)
      {
          return GetModelList("", "", p_intPageNumber, p_intPageSize);
      }

      /// <summary>
      /// 得到对象集合
      /// </summary>
      public RESULT_SUSPENSION[] GetModelList(string p_strWhere, int p_intPageNumber, int p_intPageSize)
      {
          return GetModelList(p_strWhere, "", p_intPageNumber, p_intPageSize);
      }

      /// <summary>
      /// 得到对象集合
      /// </summary>
      public RESULT_SUSPENSION[] GetModelList()
      {
          return GetModelList("", "", -1, -1);
      }

      /// <summary>
      /// 得到对象集合
      /// </summary>
      public void GetModelList(ref DataTable p_dtData, string p_strWhere, string p_strOrder, int p_intPageNumber, int p_intPageSize)
      {
          p_dtData.Clear();

          int m_intPageNumber = p_intPageNumber;
          int m_intPageCount = GetPageCount(p_strWhere, p_intPageSize);

          if((m_intPageNumber < 1) || (m_intPageNumber == 0))
          {
              m_intPageNumber = 1;
          }

          if(m_intPageNumber == -1)
          {
              m_intPageNumber = m_intPageCount;
          }

          if(m_intPageNumber > m_intPageCount)
          {
              m_intPageNumber = m_intPageCount;
          }

          string strSql = "";
          strSql += "select * from RESULT_SUSPENSION";
          if(p_strWhere.Trim().Length > 0)
          {
              strSql += " where " + p_strWhere;
          }
          if(p_strOrder.Trim().Length > 0)
          {
              strSql += " order by " + p_strOrder;
          }

          if(p_intPageSize > 0)
          {
              DbHelper.GetTable(strSql, ref p_dtData, (m_intPageNumber-1)*p_intPageSize, p_intPageSize);
          }
          else
          {
              DbHelper.GetTable(strSql, ref p_dtData);
          }
       }

       /// <summary>
       /// 得到对象集合
       /// </summary>
       public void GetModelList(ref DataTable p_dtData, string p_strWhere)
       {
           GetModelList(ref p_dtData, p_strWhere, "", -1, -1);
       }

       /// <summary>
       /// 得到对象集合
       /// </summary>
       public void GetModelList(ref DataTable p_dtData, string p_strWhere, string p_strOrder)
       {
           GetModelList(ref p_dtData, p_strWhere, p_strOrder, -1, -1);
       }

       /// <summary>
       /// 得到对象集合
       /// </summary>
       public void GetModelList(ref DataTable p_dtData, int p_intPageNumber, int p_intPageSize)
       {
           GetModelList(ref p_dtData, "", "", p_intPageNumber, p_intPageSize);
       }

       /// <summary>
       /// 得到对象集合
       /// </summary>
       public void GetModelList(ref DataTable p_dtData, string p_strWhere, int p_intPageNumber, int p_intPageSize)
       {
           GetModelList(ref p_dtData, p_strWhere, "", p_intPageNumber, p_intPageSize);
       }
       /// <summary>
       /// 得到对象集合
       /// </summary>
       public void GetModelList(ref DataTable p_dtData)
       {
           GetModelList(ref p_dtData, "", "", -1, -1);
       }
   }
}
